package com.fanshuai.springcloud.client.uservice;

import com.fanshuai.springcloud.domain.User;
import com.fanshuai.springcloud.web.response.CallResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface UserServiceClient {
    @GetMapping("/user/list")
    CallResult<List<User>> list();

    @GetMapping("/user/get")
    CallResult<User> one(long userId);

    @PostMapping("/user/add")
    CallResult<Boolean> add(@RequestBody User user);

    @PostMapping("/user/delete")
    CallResult<Boolean> delete(long userId);
}
